package c.h.b.c.a;

import c.f.c.a.d;
import c.h.b.d.a.i;
import com.huawei.hms.iap.IapApiException;
import com.huawei.hms.iap.entity.OrderStatusCode;
import com.huawei.hms.support.api.client.Status;

/* compiled from: lambda */
public final /* synthetic */ class a implements d {
    public final /* synthetic */ i a;

    public /* synthetic */ a(i iVar) {
        this.a = iVar;
    }

    public final void onFailure(Exception exception) {
        i iVar = this.a;
        if (exception instanceof IapApiException) {
            Status status = ((IapApiException) exception).getStatus();
            if (status.getStatusCode() == OrderStatusCode.ORDER_HWID_NOT_LOGIN) {
                if (status.hasResolution()) {
                    iVar.b(new h(status));
                    return;
                } else {
                    iVar.a();
                    return;
                }
            } else if (status.getStatusCode() == OrderStatusCode.ORDER_ACCOUNT_AREA_NOT_SUPPORTED) {
                iVar.a();
                return;
            } else {
                iVar.a();
                return;
            }
        }
        iVar.a();
    }
}
